import React, { useEffect, useState } from 'react';
import { useMount, useRequest } from 'ahooks';
import { SideBar, Toast } from 'antd-mobile';
import FundCard from '../FundCard';
import { FundsObj, Last3nBackTest } from '../../type';
import { formattedDate } from '../../constants';
import request from '../../request';
import axios from 'axios';
import Card from './Card';
import useFundsArr from '../../useFundsArr';

const Count = ({ fundsCode }: { fundsCode: string[] }) => {
  const { fundsInfoArr } = useFundsArr(fundsCode);

  return (
    <div className={'Count-container'}>
      {fundsInfoArr?.map?.((item) => {
        return <Card fundInfo={item} />;
      })}
    </div>
  );
};
export default Count;
